package com.example.zxx.springboot3.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Emsg:
 *
 * @author zhangxiaoxiang
 * @date 2022年2月4日
 */
@Getter
@AllArgsConstructor
public enum Emsg {

    /**
     * 系统
     */
    SUCCESS("00000", "成功"),
    FAILED("00001", "失败"),
    SYS_ERROR("00002", "系统异常"),
    PARAM_ERROR("00003", "入参异常"),
    FILE_IO_EXCEPTION("00004", "文件读取IO异常"),
    HTTP_EXCEPTION("00005", "http请求异常"),
    USER_EXIST("00008", "用户账号已存在"),
    SENTINEL_BLOCK("00009", "服务繁忙，请稍后重试"),
    SENTINEL_FALLBACK("00010", "服务网络状态不佳，请稍后重试"),
    SYSTEM_NOT_AUTHORIZED("00401", "未授权"),

    /**
     * 远程调用(不返回给前端)
     */
    FEIGN_FAILED("00040", "远程调用失败,无服务补偿"),


    /**
     * 用户
     */
    USER_NOT_EXIST("00100", "用户不存在异常"),
    USER_UNKNOWN_USER_TYPE("00101", "未知用户类型用户"),
    USER_ACCOUNT_OR_PASSWORD_WRONG("00102", "账号或密码错误"),


    /**
     * 电子签章中台
     */
    PACT_TASK_NOT_EXIST("00201", "签署任务不存在"),
    PACT_TASK_USER_NOT_EXIST("00202", "签署任务用户未实名认证"),
    PACT_TASK_STATUS_ERROR("00203", "签署任务状态错误"),
    PACT_TASK_TIME_OUT_ERROR("00204", "签署任务过期失效"),
    PACT_TASK_BIND_USER_ERROR("00205", "签署任务用户已绑定"),
    PACT_SEAL_BASE64_CONVERT_ERROR("00206", "印章base64转file失败"),
    PACT_SMS_CHECK_FAIL_ERROR("00207", "签约短信验证失败"),
    PACT_NOT_EXIST("00208", "合同不存在"),
    PACT_SIGN_SILENCE_EMPTY_ID_ERROR("00209", "合同静默签署签署任务id不能为空"),
    PACT_SIGN_SILENCE_TASK_NOT_EXIST("00210", "合同静默签署签署任务不存在"),
    PACT_KEYWORD_NOT_EXIST("00211", "合同签署关键字不存在"),
    PACT_APPLIER_ERROR("00212", "合同发起方不唯一或不存在"),
    PACT_KEYWORD_NUM_ERROR("00213", "合同签署关键字个数错误"),
    PACT_TASK_RESIGN_PARAM_ERROR("00214", "合同二次签署参数错误:关键字或代理人id不存在"),
    PACT_TASK_REAL_NAME_CARD_NO_ERROR("00215", "签章实名认证错误:实名认证证件号和预留证件号不一致"),
    PACT_TASK_SIGNATURE_NOT_STAMP_AREA("00216", "盖章区不存在"),


    /**
     * 文件
     */
    CONTRACT_FILE_IS_EMPTY("00301", "合同文件为空"),
    CONTRACT_FILE_SAVE_OSS_FAILED("00302", "合同文件上传oss失败"),
    CONTRACT_TEMPLATE_NOT_EXIST("00303", "合同模板不存在"),
    SEAL_FILE_STREAM_ERROR("00304", "获取印章文件流失败"),
    UPLOAD_FILE_NAME_IS_EMPTY("00305", "上传oss文件名为空"),
    CONTRACT_TEMPLATE_READ_FAILED("00306", "合同模板文件读取失败"),
    CONTRACT_TEMPLATE_FILL_FAILED("00307", "合同模板文件填充失败"),
    CONTRACT_TEMPLATE_SIGNATURE_NOT_EXIST("00308", "合同模板签署域不存在"),
    CONTRACT_TEMPLATE_SIGNATURE_DUPLICATE("00309", "合同模板签署域重,复使用"),
    CONTRACT_TEMPLATE_ROLE_ERROR("00310", "模板签署角色错误"),
    /**
     * 电子签章第三方接口
     */
    ESIGN_PER_PARAMETER_ERROR("01000", "个人开户请求参数错误"),
    ESIGN_ENT_PARAMETER_ERROR("01001", "企业开户请求参数错误"),
    ESIGN_REAL_NAME_RUNTIME_ERROR("01002", "实名认证时错误"),
    ESIGN_ENT_REAL_NAME_NOT_PASS_ERROR("01003", "企业实名认证未通过"),
    ESIGN_PER_REAL_NAME_NOT_PASS_ERROR("01004", "个人实名认证未通过"),
    ESIGN_ENT_REAL_NAME_CHECK_ERROR("01005", "企业实名校验错误"),
    ESIGN_PER_ORDER_NO_ERROR("01006", "申请证书订单号失败"),
    ESIGN_PER_CERT_CHECK_ERROR("01007", "申请证书签名验签失败"),
    ESIGN_PER_CERT_APPLY_ERROR("01008", "证书申请失败"),
    ESIGN_PER_CERT_DOWNLOAD_ERROR("01009", "证书下载失败"),
    ESIGN_PER_UPDATE_PARAMETER_ERROR("01010", "更新个人用户请求参数错误"),
    ESIGN_PER_NOT_EXIST_ERROR("01011", "个人用户不存在"),
    ESIGN_PER_UPDATE_REAL_NAME_NOT_PASS_ERROR("01012", "个人实名认证未通过"),
    ESIGN_PER_QUERY_PARAMETER_ERROR("01013", "查询用户请求参数错误"),
    ESIGN_SEAL_PARAMETER_ERROR("01014", "创建印章请求参数错误"),
    ESIGN_SEAL_USER_NOT_EXIST_ERROR("01015", "用户不存在"),
    ESIGN_SEAL_NOT_EXIST_ERROR("01016", "证书不存在"),
    ESIGN_SEAL_TYPE_ERROR("01017", "个人用户不能生成企业类型印章"),
    ESIGN_SEAL_PIC_RESOURCE_GET_ERROR("01018", "印章图片资源获取失败"),
    ESIGN_SEAL_PIC_TOO_LARGE_ERROR("01019", "印章图片超过1M"),
    ESIGN_SEAL_PIC_TYPE_ERROR("01020", "印章图片格式错误"),
    ESIGN_SEAL_QUERY_PARAMETER_ERROR("01021", "获取印章请求参数错误"),
    ESIGN_SEAL_QUERY_USER_NOT_EXIST_ERROR("01022", "用户不存在"),
    ESIGN_SEAL_QUERY_CERT_NOT_EXIST_ERROR("01023", "证书不存在"),
    ESIGN_SEAL_DEL_PARAMETER_ERROR("01024", "删除印章请求参数错误"),
    ESIGN_SEAL_DEL_USER_NOT_EXIST_ERROR("01025", "用户不存在"),
    ESIGN_SEAL_DEL_USER_NO_CERT_ERROR("01026", "该用户无有效证书"),
    ESIGN_SEAL_DEL_SEAL_NOT_EXIST_ERROR("01027", "印章不存在"),
    ESIGN_SEAL_DOWNLOAD_PARAMETER_ERROR("01028", "获取印章Base64请求参数错误"),
    ESIGN_SEAL_DOWNLOAD_USER_NOT_EXIST_ERROR("01029", "用户不存在"),
    ESIGN_SEAL_DOWNLOAD_NOT_EXIST_ERROR("01030", "印章不存在"),
    ESIGN_CONTACT_UPLOAD_PARAMETER_ERROR("01031", "上传合同请求参数错误"),
    ESIGN_CONTACT_UPLOAD_RESOURCE_GET_ERROR("01032", "合同模板资源获取失败"),
    ESIGN_CONTACT_UPLOAD_TOO_LARGE_ERROR("01033", "合同模板大小超过10M"),
    ESIGN_CONTACT_UPLOAD_TYPE_ERROR("01034", "合同模板格式错误"),
    ESIGN_CONTACT_UPLOAD_SAVE_ERROR("01035", "合同模板保存失败"),
    ESIGN_SERVER_PARAMETER_ERROR("01036", "服务端签署合同请求参数错误"),
    ESIGN_SERVER_USER_NOT_EXIST_ERROR("01037", "用户不存在"),
    ESIGN_SERVER_CERT_NOT_EXIST_ERROR("01038", "证书不存在"),
    ESIGN_SERVER_PFX_PARSE_ERROR("01039", "PFX证书解析错误"),
    ESIGN_SERVER_USER_NO_SEAL_ERROR("01040", "用户未绑定印章"),
    ESIGN_SERVER_SEAL_NOT_EXIST_ERROR("01041", "印章不存在"),
    ESIGN_SERVER_SEAL_NOT_ONLY_ERROR("01042", "印章不唯一错误"),
    ESIGN_SERVER_SEAL_RESOURCE_GET_ERROR("01043", "印章资源文件获取失败"),
    ESIGN_SERVER_CONTRACT_ID_OR_FILE_REQUIRE_ERROR("01044", "合同ID和合同文件不能同时为空"),
    ESIGN_SERVER_TEMPLATE_TRANSFER_ERROR("01045", "合同模板生成合同错误"),
    ESIGN_SERVER_CONTRACT_DOWNLOAD_ERROR("01046", "合同文件下载失败"),
    ESIGN_SERVER_CONTRACT_RESOURCE_GET_ERROR("01047", "合同资源文件获取失败"),
    ESIGN_SERVER_CONTRACT_NOT_EXIST_ERROR("01048", "合同不存在"),
    ESIGN_SERVER_SIGN_LOCATION_ERROR("01049", "坐标集合、关键字和签署域不能同时为空"),
    ESIGN_CONTRACT_DOWNLOAD_PARAMETER_ERROR("01050", "下载合同请求参数错误"),
    ESIGN_CONTRACT_DOWNLOAD_SIGN_DATE_NOT_EXIST_ERROR("01051", "签署数据不存在"),
    ESIGN_CONTRACT_DOWNLOAD_FAIL_ERROR("01052", "合同下载失败"),
    ESIGN_CONTRACT_DOWNLOAD_WRITE_FILE_ERROR("01053", "response写入文件错误"),
    ESIGN_SMS_SEND_PARAMETER_ERROR("01054", "短信发送请求参数错误"),
    ESIGN_SMS_SEND_USER_NOT_EXIST_ERROR("01055", "用户不存在"),
    ESIGN_SMS_SEND_CONTACT_NO_ERROR("01056", "用户联系电话错误"),
    ESIGN_SMS_SEND_FAIL_ERROR("01057", "短信发送失败"),
    ESIGN_SMS_CHECK_PARAMETER_ERROR("01058", "短信验证码发送请求参数错误"),
    ESIGN_SMS_CHECK_USER_NOT_EXIST_ERROR("01059", "用户不存在"),
    ESIGN_SMS_CHECK_SMS_NOT_EXIST_ERROR("01060", "短信不存在"),
    ESIGN_SMS_CHECK_OVER_TIME_ERROR("01061", "短信验证码已过期"),
    ESIGN_SMS_CHECK_USED_ERROR("01062", "短信验证码已校验"),
    ESIGN_SIGN_NOT_NULL_ERROR("01063", "签名值不能为空"),
    ESIGN_SIGN_CHECK_ERROR("01064", "签名验签失败"),
    ESIGN_SIGN_NON_PASS_ERROR("01065", "签名验签不通过"),
    ESIGN_UNKOWN_ERROR("01999", "接口调用失败未知错误"),
    ESIGNER_TYPE_ERROR("02000", "用户类型错误"),
    ESIGNER_USER_ERROR("02001", "用户身份信息不一致"),
    CERT_TIME_OUT_ERROR("02002", "证书过期!"),

    E2_SIGNER_USER_EXIST("02110", "用户已存在"),
    E2_STATUS_CANT_CHANGE("02120", "合同不能更改为当前不支持的状态"),
    E2_SIGN_ENT_REAL_NAME_NOT_AUTH_ERROR("02130", "企业未实名认证"),
    E2_SIGN_PER_REAL_NAME_NOT_AUTH_ERROR("02131", "个人未实名认证"),
    E2_SIGN_AMOUNT_VERIFY_FAILED("02132", "金额校验失败"),
    E2_SIGN_MAXED_AMOUNT_VERIFY("02133", "验证次数超过限制，请重新发起打款"),
    E2_SIGN_AUTH_FLOW_END("02134", "认证流程已结束"),
    E2_SIGN_AUTH_FLOW_FAILED("02135", "认证流程已失效，请重新发起认证"),
    E2_SIGN_SMS_CHECK_ERROR("02136", "验证码校验失败"),
    E2_SIGN_SMS_MAXED_CHECK_ERROR("02137", "验证码校验失败，已达到最大次数限制"),
    E2_SIGN_AUTH_INDIVIDUAL_TIMEOUT("02138", "已完成个人认证，服务器暂未响应结果，请重试"),
    E2_SIGN_AUTH_BUSINESS_TIMEOUT("02138", "已完成企业认证，服务器暂未响应结果，请重试"),

    AUTH_BUSINESS_RANDOM_TRANSFER_MAX_COUNT("00250", "本次认证失败，本次认证已达到最大转账次数"),
    AUTH_BUSINESS_VERIFY_RANDOM_MAX_COUNT("00251", "本次认证失败，对公打款金额校验已达到最大次数"),
    AUTH_INDIVIDUAL_FAIL("00253", "认证失败，清稍后再试"),
    AUTH_BUSINESS_VERIFY_RANDOM_NOT_PAY_SUCCESS("00252", "完成企业信息比对，但未发起打款"),
    AUTH_BUSINESS_VERIFY_RANDOM_PAY_SUCCESS("00254", "打款申请完成,但未转账成功"),
    AUTH_BUSINESS_VERIFY_RANDOM_FAILED("00255", "打款失败"),
    AUTH_BUSINESS_VERIFY_RANDOM_BACKFILL_COMPLETE("00256", "打款回填成功，企业认证完成"),
    AUTH_BUSINESS_VERIFY_RANDOM_CARD_NO_ERROR("00257", "企业对公账户输入有误"),
    AUTH_BUSINESS_VERIFY_RANDOM_AMOUNT_ERROR("00258", "验证金额格式输入有误，请输入0-1之间的数字,且最多保留两位小数"),
    AUTH_PARAM_ERROR("00300", "认证参数错误"),
    AUTH_PARAM_MISS("00301", "缺少参数"),


    /**
     * 短信中台
     **/
    SMS_SEND_ERROR("04000", "短信发送失败，请联系管理员"),
    SMS_CONTENT_COUNT("04001", "短信计费条数计算失败"),
    SMS_SECURITY_CODE_REPEAT("04003", "两分钟内请勿向同一个号码发送验证码短信"),
    SMS_CHANNEL_ERROR("04004", "短信发送通道异常"),
    SMS_SECURITY_CODE_EXPIRED("04005", "验证码已过期"),

    SMS_ADD_TEMPLATE_PARAM_MISSING("04101", "短信类型为(验证码)时短信内容中必须包含参数${securityCode}"),
    SMS_ADD_TEMPLATE_PLATFORM_ERROR("04110", "所属平台(platform)参数错误"),
    SMS_ADD_TEMPLATE_REPEAT("04111", "已存在该模板"),
    SMS_ADD_TEMPLATE_TYPE_ERROR("04112", "模板类型(type)参数错误"),

    SMS_ADD_TEMPLATE_PARAM_EMPTY("04120", "模板内容中包含有空参数"),
    SMS_ADD_TEMPLATE_PARAM_SIGN_MISSING("04121", "模板内容参数缺失}符号"),
    SMS_ADD_TEMPLATE_PARAM_SIGN_OVER("04122", "模板内容参数有多余的}符号"),
    SMS_ADD_TEMPLATE_PARAM_START_ERROR("04123", "模板内容参数不能以数字开头"),
    SMS_ADD_TEMPLATE_PARAM_SPECIAL_ERROR("04124", "模板内容参数不能使用特殊符号"),

    SMS_ADD_SIGNATURE_REPEAT("04201", "已存在该签名"),
    SMS_RANDOM_KEY_EXPIRE("04202", "短信随机密钥已过期"),
    SMS_RANDOM_CONTRACT_ERROR("04203", "合同错误"),
    SMS_RANDOM_CONTRACT_TIMEOUT("04204", "合同超时"),
    SMS_RANDOM_CONTRACT_REFUSAL("04205", "合同已拒签"),
    SMS_RANDOM_CONTRACT_CANCEL("04206", "合同已取消"),
    SMS_RANDOM_CONTRACT_INIT("04207", "合同初始化未完成"),


    /**
     * 优惠卷
     */
    COP_ACTIVITY_NOT_EXISTS("05001", "活动不存在"),
    COP_ACTIVITY_NOT_START("05002", "活动未开始"),
    COP_ACTIVITY_ENDED("05003", "活动已结束"),
    COP_ACTIVITY_ABORT("05004", "活动中止"),
    COP_NOT_EXISTS("05005", "优惠卷不存在"),
    COP_EXPIRE("05006", "优惠卷已过期"),
    COP_SHORTAGE_IN_NUMBER("05007", "可生成优惠卷的数量不足"),
    COP_GEN_FAIL("05008", "优惠卷获取失败，请稍后再试"),


    /**
     * 联麓短信平台
     */
    SMS_CALL_FAILED("02200", "调用平台接口失败"),
    SMS_NOT_FOUND_OPERATOR("02201", "运营商匹配失败"),
    SMS_NOT_FOUND_OPERATOR_BACK("02202", "回调匹配失败"),

    /**
     * 外呼
     */
    USER_DOES_NOT_EXIST("10001", "用户不存在!"),
    SEAT_STATUS_UNUSUAL("10003", "坐席状态不正常!"),
    CARRIER_BUSY("10004", "融营运营商服务器繁忙!"),
    CALL_FAILED("10005", "拨打失败!"),
    CAN_NOT_FIND_SEAT("10006", "外呼功能未开通,请联系外呼管理员!"),
    NO_CALL_COUNT("11017", "被叫号码达到当日最大呼叫次数，请勿重复拨打!"),
    IS_NOT_VALID_PHONE_NUM("11019", "拨打号码不是正确的号码格式"),
    XY_BUSY("11045", "运营商服务器繁忙"),
    JY_BUSY("11046", "运营商服务器繁忙"),

    /**
     * 外呼坐席
     */
    FAILED_TO_TRANSFER_SEATS("11052", "该部门不存在坐席或存在坐席1个坐席对应多个供应商线路情况,请先排除再批量转移坐席!"),


    /**
     * 外呼-融营
     */
    NOT_ENOUGH_MONEY("10008", "应用余额不足"),
    NUMBER_USED("10009", "号码已被使用,解绑后重复绑定"),
    BANNED_TIME("10010", "禁止外呼时间段"),
    WAITING_VERIFY("10011", "号码等待验证通过"),
    NUMBER_FORMAT_WRONG("10012", "号码格式有误"),
    CALL_NUMBER_BANNED("10013", "被叫号码限制外呼,存在较高风险"),
    CALL_TOO_FREQUENTLY("10014", "您拨打的频次太过频繁，请等待一分钟后操作！"),
    MAXIMUM_LIMIT("10015", "被叫号码达到当日最大呼叫次数，请勿重复拨打！"),
    /**
     * 外呼-八度
     */
    BADU_CARRIER_BUSY("10100", "八度运营商服务器繁忙!"),

    /**
     * 公共信息(语义上通用)
     */
    GLOBAL_NOT_FOUND("00404", "找不到资源"),

    /**
     * 对象存储
     */
    OSS_NO_GROUP("12102", "找不到对应的资源组，请联系管理员"),
    OSS_NO_RESOURCE("12103", "找不到对应的资源，请联系管理员"),
    OSS_UPDATE_WRONG_PATH("12111", "文件存储位置错误，请联系管理员"),
    OSS_GROUP_REPEAT("12121", "资源组已经存在"),
    OSS_PREFIX_ILLEGAL("12112", "资源组后缀格式错误，必须为'aaa/bbb/'格式"),

    /**
     * 点微
     */
    DIAN_WEI_INSUFFICIENT_BALANCE("14101", "点微余额不足"),
    DIAN_WEI_PRODUCT_NOT_EXISTS("14102", "不存在该产品"),
    DIAN_WEI_NOT_CONFIGURE("14103", "渠道未配置该产品"),
    DIAN_WEI_CHANNEL_DISABLED("14104", "该渠道已经停用"),
    DIAN_WEI_PRODUCT_CLOSED("14105", "该产品已经关闭"),
    DIAN_WEI_REQUEST_ERROR("14106", "报文解密错误"),
    DIAN_WEI_REQUEST_PARAM_ERROR("14107", "请求参数格式错误"),
    DIAN_WEI_ORDER_ID_REPEAT("14108", "渠道订单号重复"),
    DIAN_WEI_SYSTEM_EXCEPTION("14109", "调用点微异常"),
    DIAN_WEI_CHANNEL_ID_ERROR("14110", "非法渠道号"),
    DIAN_WEI_IDENTITY_ERROR("14111", "身份号证错误"),
    DIAN_WEI_UNSUPPORTED_ENCRYPTION_METHOD("14112", "不支持的加密方式"),
    DIAN_WEI_IP_NOT_CERTIFIED("14113", "IP未加入白名单"),
    DIAN_WEI_REPEAT_CALL("14114", "重复调用"),
    DIAN_WEI_SIGN_ERROR("14115", "点微请求签名错误"),

    /**
     * 云微
     */
    YUN_WEI_ERROR("15000", "云微接口异常"),
    YUN_WEI_SIGN_ERROR("15001", "云微参数签名异常"),

    /**
     * E签宝
     */
    E_SIGN_ERROR("16000", "E签宝接口异常"),
    E_SIGN_SIGN_ERROR("16001", "E签宝参数签名异常");

    private final String code;
    private final String message;


}





































